package c_01;

/**
 * @author fu-xiao-liu
 * @Date 2022/5/26 12:05
 */
public class Demo05_VirtualMethodTable  {

}

interface Friendly {
    void sayHello();
    void sayGoodbye();
}
class Dog1 {
    public void sayHello() {
    }
    @Override
    public String toString() {
        return "Dog";
    }
}

class Cat1 implements Friendly {
    public void eat() {
    }
    public void sayHello() {
    }
    public void sayGoodbye() {
    }
    protected void finalize() {
    }
    public String toString() {
        return "Cat";
    }
}

class CockerSpaniel extends Dog1 implements Friendly {
    public void sayHello() {
        super.sayHello();
    }
    public void sayGoodbye() {
    }
}

